package net.chathu.airgw.packets.gw.serverpackets 
{
	import net.chathu.airgw.Config;
	/**
	 * ...
	 * @author ze
	 */
	public class ISupportPacket implements ISendableIRCPacket
	{
		private static const _head:String = " 005 ";
		//http://www.irc.org/tech_docs/005.html
		
		private var _nick:String;
		private var _data:String;
		
		public function ISupportPacket(nick:String, data:String) 
		{
			_nick = nick;
			_data = data;
		}
		
		public function getMessage():String
		{

			//":atw.irc.hu 005 USER_NICK_PLACEHOLDER RFC2812 PREFIX=(ov)@+ CHANTYPES=#&!+ MODES=3 CHANLIMIT=#&!+:25 NICKLEN=15 TOPICLEN=160 KICKLEN=160 MAXLIST=beIR:42 CHANNELLEN=50 IDCHAN=!:5 CHANMODES=beIR,k,l,imnpstaqr :are supported by this server"
			//":atw.irc.hu 005 USER_NICK_PLACEHOLDER PENALTY FNC EXCEPTS=e INVEX=I CASEMAPPING=ascii NETWORK=IRCnet :are supported by this server"
			
			return ":" + Config.IRC_HOST + _head + _nick + " " + _data + "\n";
		}
		
		
	}

}